# 运算符
# 加 减 乘 除 取模 取商 取幂
print(3 + 5)    # 8
print(8 - 5)    # 3
print(3 * 5)    # 15
print(8 / 4)    # 2.0
print(8 % 5)    # 3
print(8 // 5)   # 1
print(5 ** 3)   # 125

# 比较运算符 true false在运算中转为数字 1 0
# 大于 小于 等于 大于等于 小于等于 不等于
print(3 > 1, 1 > 3)         # true false
print(1 < 3, 3 < 1)         # true false
print(3 >= 1, 1 >= 3)       # true false
print(1 <= 3, 3 <= 1)       # true false
print(3 == 3)               # true
print(3 == '3', 3 != '3')   # false true
#print('3' > 1)             # 错误 数字，字符串不能比较大小
# 字符串比较 比较的是编码值
print('a' > 'b')            # false
print("C" > '0')            # true

# 逻辑运算符
# 与 或 非 
age = 23
print(age >= 18 and age <=60)   # True
print(18 <= age <= 60)          # True
print(age >= 70 or age <= 12)   # False
print(not 12 <= age <= 70)      # False
print(not age == 23)            # False
print(not True)                 # False
print(not False)                # True

# 赋值运算符
# 赋值 运算赋值
i = 0
i = i + 1
i += 1
i -= 1
i *= 2
i /= 2
print(i)

# 成员运算符
# 包含 不包含
print('hell' in 'hello world')  # True
print('hllo' in 'hello world')  # False
print('a' not in 'hello world') # True
print('e' not in 'hello world') # False

# 空
# None
name = None
print(name, type(name))
